{extend name="base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/mmgrid/mmGrid.css?v={$v}" />
{/block}
{block name="js"}
<script src="__STATIC__/plugins/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
<script src="__ADMIN__/ads/admgrs.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
<div id='alertTips' class='alert alert-success alert-tips fade in'>
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
  <ul class='body'>
    <li>广告位置类型主要用于确定广告在商城里的位置，调用时把广告代码放入相应位置即可显示广告</li>
  </ul>
</div>
<form autocomplete="off" >
<div class="wst-toolbar">
		<select name="positionType" id="positionType" class="query" onchange='javascript:addPosition(this.value);'>
			<option value="">请选择广告位置类型</option>
            {volist name=":WSTDatas('ADS_TYPE')" id='vo'}
            <option value="{$vo['dataVal']}">{$vo['dataName']}</option>
            {/volist}
	    </select>
		<select name="adPositionId" id="adPositionId" class="query" >
			<option value="">请选择</option>
		</select>
		<button class="btn btn-primary" type='button' onclick="javascript:loadQuery()"><i class='fa fa-search'></i>查询</button>
   {if WSTGrant('GGGL_01')} 
   <button class="btn btn-success f-right btn-fixtop" type='button' onclick="javascript:location.href='<?=url("admin/ads/toEdit")?>'"><i class='fa fa-plus'></i>新增</button>
   {/if}
   <div style="clear:both"></div>
</div>
</form>
<div class='wst-grid'>
<div id="mmg" class="mmg"></div>
<div id="pg" style="text-align: right;"></div>
</div>
<script>
$(function(){initGrid({$p})});
</script>

{/block}
